home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / DBL Pascal Library / RSRCRuntime / Patch Info next >
Text File  |  1992-08-31  |  979b  |  17 lines

  1. The RSRCRuntime.Lib distributed with THINK Pascal 4.0.1 has a bug in the RememberA4 routine which causes the A4 register to be corrupted upon return to the code resource’s caller. Obviously, this will cause problems for the caller if A4 is in use across calls to the code resource. One way that this can happen is if the code resource is called from the scope of a ‘with’ statement, as in:
  2.  
  3.   with myVars do {use A4 to reference myVars}
  4.     begin
  5.       CallCodeResource; {bug in RSRCRuntime.Lib trashes A4}
  6.       x := field_of_myVars; {this won’t work if A4 is trashed!}
  7.     end;
  8.  
  9. The version of RSRCRuntime.Lib in this folder has a patched version of RememberA4. The patch was applied to the data fork of the file as follows:
  10.  
  11.   Find:      41FA FFFA 2842 208C 4E75
  12.   Replace: 41FA FFFA 4E71 2082 4E75
  13.  
  14. Note: This bug was reported to THINK on 2/21/92. As I write this, they have not responded with a fix of their own, so this is to be considered an UNOFFICIAL fix!
  15.  
  16. DBL, 4/21/92
  17.